<!--<?php
include_once PrintEot('header');
print <<<EOT
-->
<form id="form" name="form" action="$admin_file" method="post">
<center>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td align="left" class="tittab">
                <strong>ݲ数据查询&gt;&gt;广告主日统计数据</strong>
            </td>
        </tr>
    </table>
    <table id="Table50" border="0" cellpadding="0" cellspacing="1" width="97%" align=center>              
        <tr>
            <td height="50px" colspan=2><b></b><select ID="adv_id" name="adv_id"><option value="0">请选择广告计划</option>$op_advlist</select>			
						开始日期<input name="start_date" type="text" readonly id="start_date" style="WIDTH:60px" class="text"/><A href="javascript:OpenCalendar('start_date', false)"><IMG src="$imgpath/admin/icon-calendar.gif" align="absMiddle" border="0"></A>
						结束日期<input name="end_date" type="text" readonly id="end_date" style="WIDTH:60px" class="text"/><A href="javascript:OpenCalendar('end_date', false)"><IMG src="$imgpath/admin/icon-calendar.gif" align="absMiddle" border="0"></A>			
						<input type="button" ID="btnQuery" value="查询"  class="text"/><a href="javascript:document.location.reload();">
						</td> 
            <td align="right" valign="center">
                <table id="Table51" border="0" cellpadding="0" cellspacing="5" height="30">
                    <input id="Hidden1" name="allSelect" type="hidden" value="all" />
                    <tr>
                        <td align="middle" valign="center">
                            <a href="javascript:document.location.reload();">
	<img align="absMiddle" border="0" height="15" src="$imgpath/admin/reserch.gif" style="text-decoration: underline"  width="17" /><span style="color: #547054"> 刷新</span></a>
                        </td>
                    </tr>
                </table>
            </td>     						
        </tr>
        <tr>
            <td height="2">
            </td>
        </tr>
    </table>
    <div class="tab">
        <table id="Table52" border="0" cellpadding="3" cellspacing="0" align=center>
            <tr>
                <td align="middle" class="title" height="20" valign="center">序号</td> 
                <td align="middle" class="title" height="20" valign="center">日期</td>                                                                    
                <td align="middle" class="title" height="20" valign="center">广告主-广告计划</td>
                <td align="middle" class="title" height="20" valign="center">创意</td>
                <td align="middle" class="title" height="20" valign="center">显示</td>                               
                <td align="middle" class="title" height="20" valign="center">点击</td>    
                <td align="middle" class="title" height="20" valign="center">计费</td> 
                <td align="middle" class="title" height="20" valign="center">修正</td>                 
                <td align="middle" class="title" height="20" valign="center">订单金额</td>      
                <td align="middle" class="title" height="20" valign="center">送货费用</td> 
                <td align="middle" class="title" height="20" valign="center">修正金额</td> 
                <td align="middle" class="title" height="20" valign="center">单价</td> 
                <td align="middle" class="title" height="20" valign="center">总价</td> 
                <td align="middle" class="title" height="20" valign="center">结算总价</td>         
                                                                                                                                                                                                                                                                                                                                                                                     
            </tr>
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_affdaydatalist); 
foreach($db_merdaydatalist as $db_merdaydate ){
	$db_merchant = getMerchant($db_merdaydate[mer_id]);
	$db_creative = getAdvCreative($db_merdaydate[creative_id]);	
	$db_adv = getAdvertise($db_merdaydate[adv_id]);
	$curidx = $curidx+1;
	$curpageidx = $curpageidx+1;
	$cdate = date('Y/m/d H:i:s',$db_show[create_time]);
print <<<EOT
-->
            <tr height="30" onclick="SwitchTd(this,'click',$curpageidx);" onmouseout="SwitchTd(this,'out',$curpageidx);" onmouseover="SwitchTd(this,'over',$curpageidx);" style="cursor: hand">
                <td align="middle" valign="center">$curidx</td>               
                <td align="middle" valign="center">&nbsp;$db_merdaydate[iday]</td>
                <td align="middle" valign="center">&nbsp;$db_merchant[name]($db_merdaydate[mer_id])-$db_adv[name]($db_merdaydate[adv_id])</td>
                <td align="middle" valign="center">&nbsp;$db_creative[name]($db_affdaydate[creative_id])</td>    
                <td align="middle" valign="center">&nbsp;$db_merdaydate[show_num]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[click_num]</td> 
                <td align="middle" valign="center">&nbsp;$db_merdaydate[real_num]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[fake_num]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[order_money]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[total_money]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[fake_totalmoney]</td>  
                <td align="middle" valign="center">&nbsp;$db_merdaydate[price]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[total_money]</td>
                <td align="middle" valign="center">&nbsp;$db_merdaydate[pay_money]</td>
            </tr>
 <!--
EOT;
}
if($showcount==0){
print <<<EOT
-->
 <tr align="center" valign="middle">
 	<td style="color:red;height:50px" colspan="14">请选择或设定查询条件</td>
 </tr>
<!--
EOT;
}
print <<<EOT
-->
        </table>
    </div>
    <table id="Table1" border="0" cellpadding="0" cellspacing="0" width="98%">
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" height="35">
<!--
EOT;
	showPageBreakInfo($showcount);
print <<<EOT
-->
             &nbsp;</td>
        </tr>
    </table>
	<input type="hidden" id="count" name="count" value="$showcount" />

</form>
<!--
EOT;
?>-->

